<?php require 'config/Config.php'; ?>
<?php
    if(ImportUtils::validateImportKey()){
        $type = Utils::getValPost('type');
        if($type == 'SettledContract'){
            $ret = ImportUtils::importSettledContract();
            echo $ret;            
        }else if($type == 'UserAccount'){
            $ret = ImportUtils::updateUserBalance();
            echo $ret;
        }else if($type == 'CrawlData'){
            $ret = ImportUtils::updateCrawlData();
            echo $ret;
        }else if($type == 'leagueStatus'){
            $ret = ImportUtils::updateLeagueStatus();
            echo $ret;
        }else if($type == 'appStatus'){
            $ret = ImportUtils::updateStatus();
            echo $ret;
        }else if($type == 'Setting'){
            $ret = ImportUtils::updateSetting();
            echo $ret;
        }
    }else{
        echo 'unauthorized';
    }
    
    
?>
